module Utils {

    export class BaseSingleton {
        public static inst: BaseSingleton;

        public score: number;
        public blood: number;
        public level: number;
        public levelUpScore: number;
        public bulletLevel: number;

        constructor() {
            if (BaseSingleton.inst instanceof BaseSingleton) {
                throw new Error("DataManager Is An Instance.");
            }
        }

        public static getInstance(): BaseSingleton {
            if (!(BaseSingleton.inst instanceof BaseSingleton)) {
                BaseSingleton.inst = new BaseSingleton();
                BaseSingleton.init();
            }
            return BaseSingleton.inst;
        }

        public static init() {
            throw new Error("Singleton Is Base Of All Instance Class.");
        }
    }

}